PROJECT_DIR 	= /data
CROSS_COMPILE 	= ${PROJECT_DIR}/project/czrain_matrix/software/src/Android/firefly_rk3288_android4.4_pad/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-

ifneq ($(KERNELRELEASE),)

obj-m := spi-rockchip-rc522.o

else
	KDIR := ${PROJECT_DIR}/project/czrain_matrix/software/src/Android/firefly_rk3288_android4.4_pad/kernel/

all:
	    make -C $(KDIR) M=$(PWD) modules ARCH=arm CROSS_COMPILE=${CROSS_COMPILE}
		cp spi-rockchip-rc522.c ${KDIR}/drivers/spi/
		cp spi-rockchip-rc522.h ${KDIR}/drivers/spi/
clean:
	    rm -rf .*.cmd .tmp_versions *.ko *.o *.mod.o *.mod.c *.symvers *.order

endif

